package com.neo.controller;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ClassName: ReceiverConfigApiGateway
 * @Description: ApiGateway接收器配置
 * @author: xufeng
 * @date: 2020/9/28 10:21
 */

public class ReceiverConfigApiGateway implements Serializable {
    private String serviceName = "receiverApiGateway";//对应服务名称
    private String id;//如果留空则系统自动分配
    private boolean enable = true;//是否开启
    private boolean async = false;//是否异步执行
    private boolean exceptionExit = false;//是否发生异常时退出任务
    private boolean logUpload = true;//日志是否上传

    private List<String> predicatesName = new ArrayList<>();
    private List<Map<String, String>> predicatesArgs = new ArrayList<>();

    private List<String> filtersName = new ArrayList<>();
    private List<Map<String, String>> filtersArgs = new ArrayList<>();

    private String uri;//路由规则转发的目标uri
    private Map<String, Object> metadata = new HashMap<>();
    private int order = 0;//路由执行的顺序


    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public boolean isAsync() {
        return async;
    }

    public void setAsync(boolean async) {
        this.async = async;
    }

    public boolean isExceptionExit() {
        return exceptionExit;
    }

    public void setExceptionExit(boolean exceptionExit) {
        this.exceptionExit = exceptionExit;
    }

    public boolean isLogUpload() {
        return logUpload;
    }

    public void setLogUpload(boolean logUpload) {
        this.logUpload = logUpload;
    }

    public List<String> getPredicatesName() {
        return predicatesName;
    }

    public void setPredicatesName(List<String> predicatesName) {
        this.predicatesName = predicatesName;
    }

    public List<Map<String, String>> getPredicatesArgs() {
        return predicatesArgs;
    }

    public void setPredicatesArgs(List<Map<String, String>> predicatesArgs) {
        this.predicatesArgs = predicatesArgs;
    }

    public List<String> getFiltersName() {
        return filtersName;
    }

    public void setFiltersName(List<String> filtersName) {
        this.filtersName = filtersName;
    }

    public List<Map<String, String>> getFiltersArgs() {
        return filtersArgs;
    }

    public void setFiltersArgs(List<Map<String, String>> filtersArgs) {
        this.filtersArgs = filtersArgs;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public Map<String, Object> getMetadata() {
        return metadata;
    }

    public void setMetadata(Map<String, Object> metadata) {
        this.metadata = metadata;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }
}
